seo

Tool of the Week – Sinatra

When run, the above code will fire up a small web server that will greet you with “Hello World” when “/” is accessed.

Many of you out there may be asking yourself, “What is the use of that?” Well, I’ll lift a quote from old blue eyes himself:

“I’m not one of those complicated, mixed-up cats. I’m not looking for the secret to life…. I just go on from day to day, taking what comes.” -Frank Sinatra

Mr. Sinatra was obviously a minimalist.  A simple man that liked to sing songs…. Sing songs and hang out with the President of the United States, Marilyn Monroe, and the mob.

Anyway, most frameworks are overkill for simple projects. Larger frameworks are great for sites that need to do a lot of heaving lifting, but more often than not they’re simply too big for little tasks.  Would you use a jackhammer to hang a picture? Big solutions don’t make sense for little problems.

Need a quick web interface to a database?  Sinatra can handle it. Need to build a simple Facebook app? Sinatra knows that diddy too. Have an idea for an application that could make killer linkbait? Sinatra could sit in. Any small task that you need to accomplish over the web, Sinatra can help you accomplish, with minimal effort.

That being said, I will give you guys a head up and say that Sinatra is young and won’t take care of everything for you. We used Sinatra to build an application we’re using behind the scenes here at the Mozplex. While it offered the benefit of “immediate results,” as time went on we found ourselves adding more and more features to it.  Our simple little app started becoming more and more complex. When we tried introducing tests into the application to keep it maintainable, the results were not so immediate. That being said, your mileage may vary with Sinatra.  However, for those small tasks where you need to get something done immediately, it can be a life saver.

If you’re interested in some apps that are powered or used by Sinatra, here are some links to check out:

http://github.com/deadprogrammer/frankie/tree/master
http://atonie.org/2008/02/git-wiki
http://carlosgabaldon.com/calabro/blog/post/2008/04/14/Singing_with_Sinatra

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button